<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>IDA SDK: Add segment flags</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">IDA SDK
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="files.html"><span>Header&#160;Files</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a>  </div>
  <div class="headertitle">
<div class="title">Add segment flags<div class="ingroups"><a class="el" href="group__seg.html">Segments</a> &raquo; <a class="el" href="group__seg__man.html">Segment manipulation functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Passed as 'flags' parameter to <a class="el" href="group__seg__man.html#ga9c959024724f499c3c1b3c2ddb1f63b4" title="Add a new segment. ">add_segm_ex()</a> </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga94dc2da752d9e80fad8caf501c5489d9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___a_d_d_s_e_g__.html#ga94dc2da752d9e80fad8caf501c5489d9">ADDSEG_NOSREG</a>&#160;&#160;&#160;0x0001</td></tr>
<tr class="memdesc:ga94dc2da752d9e80fad8caf501c5489d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">set all default segment register values to <a class="el" href="pro_8h.html#a893ddf307fae0a3bbca667ee917cddc7" title="&#39;bad selector&#39; value ">BADSEL</a>  <a href="#ga94dc2da752d9e80fad8caf501c5489d9">More...</a><br /></td></tr>
<tr class="separator:ga94dc2da752d9e80fad8caf501c5489d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaef2ab311485a9bc2b09d2a8f03a647a3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaef2ab311485a9bc2b09d2a8f03a647a3"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___a_d_d_s_e_g__.html#gaef2ab311485a9bc2b09d2a8f03a647a3">ADDSEG_OR_DIE</a>&#160;&#160;&#160;0x0002</td></tr>
<tr class="memdesc:gaef2ab311485a9bc2b09d2a8f03a647a3"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="pro_8h.html#a53e88c62090838e19cb5ee945d7ab8f7" title="Call qatexit functions, shut down UI and kernel, and exit. ">qexit()</a> if can't add a segment <br /></td></tr>
<tr class="separator:gaef2ab311485a9bc2b09d2a8f03a647a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5d6e405b6fb6faf18cc2c064ba592401"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___a_d_d_s_e_g__.html#ga5d6e405b6fb6faf18cc2c064ba592401">ADDSEG_NOTRUNC</a>&#160;&#160;&#160;0x0004</td></tr>
<tr class="memdesc:ga5d6e405b6fb6faf18cc2c064ba592401"><td class="mdescLeft">&#160;</td><td class="mdescRight">don't truncate the new segment at the beginning of the next segment if they overlap.  <a href="#ga5d6e405b6fb6faf18cc2c064ba592401">More...</a><br /></td></tr>
<tr class="separator:ga5d6e405b6fb6faf18cc2c064ba592401"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaee75ca1c810be184ef12055d637e5d2f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaee75ca1c810be184ef12055d637e5d2f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___a_d_d_s_e_g__.html#gaee75ca1c810be184ef12055d637e5d2f">ADDSEG_QUIET</a>&#160;&#160;&#160;0x0008</td></tr>
<tr class="memdesc:gaee75ca1c810be184ef12055d637e5d2f"><td class="mdescLeft">&#160;</td><td class="mdescRight">silent mode, no "Adding segment..." in the messages window <br /></td></tr>
<tr class="separator:gaee75ca1c810be184ef12055d637e5d2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad1996026d4ee36dd29aeee83535c845d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___a_d_d_s_e_g__.html#gad1996026d4ee36dd29aeee83535c845d">ADDSEG_FILLGAP</a>&#160;&#160;&#160;0x0010</td></tr>
<tr class="memdesc:gad1996026d4ee36dd29aeee83535c845d"><td class="mdescLeft">&#160;</td><td class="mdescRight">fill gap between new segment and previous one.  <a href="#gad1996026d4ee36dd29aeee83535c845d">More...</a><br /></td></tr>
<tr class="separator:gad1996026d4ee36dd29aeee83535c845d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaadc4d5db47a493aca1f9a9d3725d7651"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaadc4d5db47a493aca1f9a9d3725d7651"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___a_d_d_s_e_g__.html#gaadc4d5db47a493aca1f9a9d3725d7651">ADDSEG_SPARSE</a>&#160;&#160;&#160;0x0020</td></tr>
<tr class="memdesc:gaadc4d5db47a493aca1f9a9d3725d7651"><td class="mdescLeft">&#160;</td><td class="mdescRight">use sparse storage method for the new segment <br /></td></tr>
<tr class="separator:gaadc4d5db47a493aca1f9a9d3725d7651"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa193b0b6eb2b21ea8b440de9fcad9e78"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa193b0b6eb2b21ea8b440de9fcad9e78"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___a_d_d_s_e_g__.html#gaa193b0b6eb2b21ea8b440de9fcad9e78">ADDSEG_NOAA</a>&#160;&#160;&#160;0x0040</td></tr>
<tr class="memdesc:gaa193b0b6eb2b21ea8b440de9fcad9e78"><td class="mdescLeft">&#160;</td><td class="mdescRight">do not mark new segment for auto-analysis <br /></td></tr>
<tr class="separator:gaa193b0b6eb2b21ea8b440de9fcad9e78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga11530c497d1630b0f2aeae908b038d0c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___a_d_d_s_e_g__.html#ga11530c497d1630b0f2aeae908b038d0c">ADDSEG_IDBENC</a>&#160;&#160;&#160;0x0080</td></tr>
<tr class="memdesc:ga11530c497d1630b0f2aeae908b038d0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">'name' and 'sclass' are given in the IDB encoding;  <a href="#ga11530c497d1630b0f2aeae908b038d0c">More...</a><br /></td></tr>
<tr class="separator:ga11530c497d1630b0f2aeae908b038d0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga94dc2da752d9e80fad8caf501c5489d9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ADDSEG_NOSREG&#160;&#160;&#160;0x0001</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>set all default segment register values to <a class="el" href="pro_8h.html#a893ddf307fae0a3bbca667ee917cddc7" title="&#39;bad selector&#39; value ">BADSEL</a> </p>
<p>(undefine all default segment registers) </p>

</div>
</div>
<a class="anchor" id="ga5d6e405b6fb6faf18cc2c064ba592401"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ADDSEG_NOTRUNC&#160;&#160;&#160;0x0004</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>don't truncate the new segment at the beginning of the next segment if they overlap. </p>
<p>destroy/truncate old segments instead. </p>

</div>
</div>
<a class="anchor" id="gad1996026d4ee36dd29aeee83535c845d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ADDSEG_FILLGAP&#160;&#160;&#160;0x0010</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>fill gap between new segment and previous one. </p>
<p>i.e. if such a gap exists, and this gap is less than 64K, then fill the gap by extending the previous segment and adding .align directive to it. This way we avoid gaps between segments. too many gaps lead to a virtual array failure. it can not hold more than ~1000 gaps. </p>

</div>
</div>
<a class="anchor" id="ga11530c497d1630b0f2aeae908b038d0c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ADDSEG_IDBENC&#160;&#160;&#160;0x0080</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>'name' and 'sclass' are given in the IDB encoding; </p>
<p>non-ASCII bytes will be decoded accordingly </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
